#include "fxcc/yml/Serializer.h"
#include "fxcc/core/graph/common/ImageMipmap.h"

using namespace fxcc::yml;
using CType = fxcc::graph::common::ImageMipmap;;


template<>
void Serializer::Encode<CType::Desc>(YAML::Node& node, const CType::Desc& inst)
{
	SetVariable<int>(node , "m_wicReq", inst.m_wicReq);
	SetVariable<int>(node, "m_wicHdr", inst.m_wicHdr);
	SetVariable<std::string>(node, "m_wicPath", inst.m_wicPath);

}


template<>
bool Serializer::Decode<CType::Desc>(const YAML::Node& node, CType::Desc& inst)
{
	GetVariable<int>(node, "m_wicReq", inst.m_wicReq);
	GetVariable<int>(node, "m_wicHdr", inst.m_wicHdr);
	GetVariable<std::string>(node, "m_wicPath", inst.m_wicPath);
	return true;
}


template<>
void Serializer::Encode<CType>(YAML::Node& node, const CType& inst)
{
	Encode<fxcc::Base>(node, inst);
	SetVariable<CType::Desc>(node, "m_Desc", inst.m_Desc);
}


template<>
bool Serializer::Decode<CType>(const YAML::Node& node, CType& inst)
{
	Decode<fxcc::Base>(node, inst);
	GetVariable<CType::Desc>(node, "m_Desc", inst.m_Desc);
	return true;
}
